﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebSiteConfig.aspx.cs"
    Inherits="LongSpeed.WebSite.Main.Admin.WebSiteConfig" %>

<%@ Register Assembly="Ext.Net" TagPrefix="ext" Namespace="Ext.Net" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport runat="server" ID="vpServerConfig" Layout="BorderLayout">
        <Items>
            <ext:Panel Region="North" runat="server" ID="plParentMemu" BaseCls="x-plain">
                <Content>
                    <p style="margin: 15px; font-size: 20px;">
                        网站站点配置
                    </p>
                </Content>
            </ext:Panel>
            <ext:FormPanel ID="fpConfig" Region="Center" runat="server" Frame="true" LabelAlign="Right"
                Padding="10" Height="300">
                <Items>
                    <ext:TextArea LabelStyle="text-align:right" AnchorVertical="15%" ID="txtTitle" FieldLabel="标题" runat="server" AnchorHorizontal="100%" DataIndex="Tilte" />
                    <ext:TextArea LabelStyle="text-align:right" AnchorVertical="15%" ID="txtDescription" FieldLabel="描述" runat="server" AnchorHorizontal="100%" DataIndex="Description" />
                    <ext:TextArea LabelStyle="text-align:right" AnchorVertical="15%" ID="txtKeyWords" FieldLabel="关键字" runat="server" AnchorHorizontal="100%" DataIndex="KeyWords" />
                    <ext:TextArea LabelStyle="text-align:right" AnchorVertical="15%" ID="txtAdd" FieldLabel="地址" runat="server" AnchorHorizontal="100%" DataIndex="Address" />
                    <ext:TextArea LabelStyle="text-align:right" AnchorVertical="15%" ID="txtContactPhone" FieldLabel="联系方式" runat="server" AnchorHorizontal="100%" DataIndex="ContactPhone" />
                    <ext:TextArea LabelStyle="text-align:right" AnchorVertical="15%" ID="txtCopyright" FieldLabel="版权" runat="server" AnchorHorizontal="100%" DataIndex="Copyright" />
                </Items>
                <Buttons>
                    <ext:Button Text="保存" runat="server" Icon="Disk" Handler="SaveConfig" />
                </Buttons>
            </ext:FormPanel>
        </Items>
    </ext:Viewport>
    <script type="text/javascript" language="javascript">
        function SaveConfig() {
            var data = fpConfig.getForm().getFieldValues(false, "dataIndex");
            Ext.net.DirectMethods.SaveConfig(data, {
                success: function (result) {
                    //win.hide();
                    Ext.Msg.alert("提示", "操作成功！");
                },
                failure: function (msg) { Ext.Msg.alert("提示", "操作失败！"); }
            });
        }
    </script>
    </form>
</body>
</html>
